< previous page page_658 next page >

Page 658
No Dropping Here
Have you ever tried to drag a control over someplace it does not want to go? When this happens, you generally see the icon for the international no symbola circle with a line through it. If you want to use this functionality in your application, you need to add code to change the icon when the control is in a location where it shouldnt be dropped. You do this by adding code to the DragOver() events of the items in which you dont want to allow the drop operation to occur.
EXERCISE
Add a Text Box to the Drag Form
1. Go back to Visual Basic design mode.
2. Add a text box to your form so that it looks like the one shown in Figure 32.3.
3. Set the Name property to txtNoDrop.
4. Set the Text property to Can't Drop On Me.
analysis.gifIn the next sample, you will not allow the Label control to drop on this text box you just added to this form.

Examples Filename: Drag2.frm
8160-0658a.gif
Figure 32.3
Cant drop on me.
Time to Save Your Work
Before you begin more work on this example, lets save the project youve created so far in a completely new folder.

 
< previous page page_658 next page >

If you like this book, buy it!